function getXmlHttpRequest() {
	var xmlHttp = undefined;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp = new XMLHttpRequest();
	} catch (e) {
		// Internet Explorer
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {

			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				return false;
			}
		}
	}

	return xmlHttp;
}


function sendPost(datasets) {
	
	$.ajax({
	   type: "POST",
	   url: "/ec/testServlet",
	   data: "name=\u9EC4\u8DC3\u6587&key=huangyw",
	   contentType:"application/x-www-form-urlencoded;",
//	   contentType:"text/plain;charset=gbk",
	   success: function(msg){
	     alert( "success");
	   },
	   error:function(xhr){
		   alert(xhr.responseText) ;
	   }
	});

}

//function sendPost(datasets) {
//	var xmlHttp = getXmlHttpRequest();
//	xmlHttp.onreadystatechange = function() {
//		if (xmlHttp.readyState == 4) {
//			document.myForm.time.value = xmlHttp.responseText;
//		}
//	};
//	var url = "/ec/e?name=��Ծ��";
//	xmlHttp.open("POS", url, true);
//	var reqJson = JSON.stringify(datasets[0]);
//	xmlHttp.send(reqJson);
//
//}
